import React from "react";
import { HashRouter as Router, Route, Switch } from "react-router-dom";

import Home from "./view/index/Home";
import About from "./view/about/About";
import News from "./view/news/News";
import NewsDetail from "./view/news/NewsDetail";

function App() {
  return (
    <div className="App">
      <Router>
        <Switch>
          <Route path="/" exact component={Home}></Route>
          <Route path="/about" exact component={About}></Route>
          <Route path="/news" exact component={News}></Route>
          <Route path="/news/:id" exact component={NewsDetail}></Route>
        </Switch>
      </Router>
    </div>
  );
}

export default App;
